package com.demo;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.kafka.support.Acknowledgment;
import org.springframework.stereotype.Component;

@Component
public class Consumer {

    @KafkaListener(id = "myId", topics = "topic1")
    public void listen(String in ,Acknowledgment ack) {
        System.out.println(in);
        ack.acknowledge();
    }
    @KafkaListener(id = "myId2", topics = "application-logs")
    public void listen2(String in,Acknowledgment ack) {
        System.out.println("resinfo:"+in);
        ack.acknowledge();
    }
}
